Optimal. Leaf size=19 \[ a x-\frac{b \tanh (c+d x)}{d}+b x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0132686, antiderivative size = 19, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3473, 8} \[ a x-\frac{b \tanh (c+d x)}{d}+b x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3473
Rule 8
Rubi steps
\begin{align*} \int \left (a+b \tanh ^2(c+d x)\right ) \, dx &=a x+b \int \tanh ^2(c+d x) \, dx\\ &=a x-\frac{b \tanh (c+d x)}{d}+b \int 1 \, dx\\ &=a x+b x-\frac{b \tanh (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0067343, size = 28, normalized size = 1.47 \[ a x+\frac{b \tanh ^{-1}(\tanh (c+d x))}{d}-\frac{b \tanh (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.002, size = 47, normalized size = 2.5 \begin{align*} ax-{\frac{b\tanh \left ( dx+c \right ) }{d}}-{\frac{\ln \left ( \tanh \left ( dx+c \right ) -1 \right ) b}{2\,d}}+{\frac{\ln \left ( \tanh \left ( dx+c \right ) +1 \right ) b}{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.09244, size = 42, normalized size = 2.21 \begin{align*} b{\left (x + \frac{c}{d} - \frac{2}{d{\left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}}\right )} + a x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.0544, size = 96, normalized size = 5.05 \begin{align*} \frac{{\left ({\left (a + b\right )} d x + b\right )} \cosh \left (d x + c\right ) - b \sinh \left (d x + c\right )}{d \cosh \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.190726, size = 20, normalized size = 1.05 \begin{align*} a x + b \left (\begin{cases} x - \frac{\tanh{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \tanh ^{2}{\left (c \right )} & \text{otherwise} \end{cases}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.1661, size = 46, normalized size = 2.42 \begin{align*} a x + b{\left (\frac{d x + c}{d} + \frac{2}{d{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]